package common.model.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import common.model.enums.FileSizeUnitEnum;
import common.model.po.base.BasePo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author 米泽鹏
 * @since 2024-08-17 下午 03:13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "g_blueprint", autoResultMap = true)
@ApiModel(value = "GBlueprint对象", description = "")
public class GBlueprint extends BasePo<GBlueprint> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "蓝图名称")
	private String blueprintName;

	@ApiModelProperty(value = "蓝图描述")
	@TableField("description")
	private String description;

	@ApiModelProperty(value = "是否是巨型蓝图：	0-否	1-是")
	private Integer isMega;

	@ApiModelProperty(value = "项目计数")
	private Integer itemCount;

	@ApiModelProperty(value = "坐标（仅巨型蓝图）")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<Integer> coordinate;

	@ApiModelProperty(value = "仅粘贴在原始位置（仅巨型蓝图）：	0-否	1-是")
	private Integer isOriginalLocationOnly;

	@ApiModelProperty(value = "评分")
	private BigDecimal rate;

	@ApiModelProperty(value = "游戏版本")
	private Integer gameVersion;

	@ApiModelProperty(value = "蓝图作者id")
	private Long authorId;

	@ApiModelProperty(value = "下载链接")
	private String downloadUrl;

	@ApiModelProperty(value = "配置下载链接")
	private String configDownloadUrl;

	@ApiModelProperty(value = "下载次数")
	private Integer downloadCount;

	@ApiModelProperty(value = "文件大小")
	private BigDecimal fileSize;

	/**
	 * {@link FileSizeUnitEnum}
	 */
	@ApiModelProperty(value = "文件大小单位：	1-KB	2-MB	3-GB")
	private Integer fileSizeUnit;

	@ApiModelProperty(value = "蓝图创建时间")
	private String blueprintCreateTime;

	@ApiModelProperty(value = "蓝图更新时间")
	private String blueprintUpdateTime;

	@ApiModelProperty(value = "图片地址")
	@TableField(typeHandler = JacksonTypeHandler.class)
	private List<String> images;

	@ApiModelProperty(value = "游戏中图标图片地址")
	private String iconImage;

	@ApiModelProperty(value = "游戏中图标图片地址的背景色")
	private String iconImageBackground;

	@Override
	public Serializable pkVal() {
		return super.getId();
	}

}
